package com.shop.model.mapper;

import com.shop.model.entity.UserTb;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author shop
 * @since 2018-12-03
 */
@Mapper
public interface UserTbMapper extends BaseMapper<UserTb> {
    @Update("update user_tb set password=#{password} where user_name=#{username}")
    boolean updatePassword(@Param("password")String password,@Param("username")String userName);


    @Select("select * from user_tb where user_name=#{username}")
    List<UserTb> getUserListByName(String username);
}
